package com.filter;


import com.entity.Poker;

import java.util.Collections;
import java.util.List;


public abstract class BaseGroupFilter implements GroupFilter {
    protected List<Poker> pokers;

    public BaseGroupFilter(List<Poker> pokers) {
        this.pokers = pokers;
    }

    /**
     * 过滤牌型
     * @return
     */
    @Override
    public boolean filter() {
        Collections.sort(pokers);
        return filterHandler();
    }

    protected abstract boolean filterHandler();
}
